<template>
  <div>
    <div class="shoplist_container">
      <ul>
        <li v-for="item in list" :key="item.COUNTNUM">
          <div class="shop_right">
            <p class="shop_name"><span>患者姓名：{{item.PATIENTNAME}}</span><span class="patient_time">{{item.OPENTIME}}</span></p>
            <p class="shop_message">患者信息：{{item.PATIENTBASEINFO}}</p>
            <p class="fee_distance">症状：{{item.PATIENTPHONE}}</p>
            <p class="fee_distance">药方详情：{{item.DURGSLIST}}</p>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list: [],
      ts: this.newStore()
    };
  },
  created() {
    this.getRecord(this.today);
  },
  methods: {
    getRecord(day) {
      this.curDay = day;
      var req = JSON.stringify({
        OTRequest: {
          VERSION: "1.0",
          TN: "F27.APP.01.20",
          CLIENTID: "YLAPP",
          RYBID: "DOCTOR",
          TOKEN:
            "Ekzmrq5qIPxtYdlDKpLACV5vbxHsCfzJHnpOImO8qOj5ZngSq5kVFFTG5JQZjHf3",
          DATA: {
            doctorId: this.$root.doctorInfo.doctorId,
            rowsperpage: "20",
            pageno: "1",
            ordercolumn: "openTime",
            ordertype: "desc",
            patientId: this.$root.patientInfo.patientId,
          }
        }
      });

      this.spost(this.ts, "/doctor/debug/AppMainServlet.ap", {
        "": req
      }).then(ts => {
        this.list = ts.d.DATAOBJ.DATA;
      });
    }
  }
};
</script>
<style>
* {
  margin: 0;
  padding: 0;
}
.shoplist_container {
  padding-top: 3rem;
  background: #fff;
  margin-bottom: 4rem;
}
.shop_right {
  padding: 0.4rem 1rem 0 1rem;
  border-bottom: 1px solid #f1f1f1;
}
.shop_name {
  color: #333;
  font: 0.85rem/0.85rem "PingFangSC-Regular";
  font-weight: 700;
}
.shop_message {
  font-size: 0.5rem;
  color: #333;
}
.fee_distance {
  font-size: 0.5rem;
  color: #666;
}
.patient_time {
  color: #3190e8;
  float: right;
  font-size: 0.6rem;
  line-height: 1.5rem;
}
</style>

